import { showTips } from "@/utils/util";
export const useAddress = (modApi: (params: any) => Promise<any>, proTable: any) => {
	const updateLocationDialog = reactive<any>({
		visible: false,
		title: "位置信息",
		detail: {}
	});

	//调整位置
	const submitLocation = async () => {
		let { code } = await modApi(updateLocationDialog.detail);
		let ok = showTips(code, "修改设备位置");
		if (ok) {
			updateLocationDialog.visible = false;
			proTable.value.getTableList();
		}
	};
	return {
		updateLocationDialog,
		submitLocation
	};
};
